﻿#region

using System;
using DeepEarth.Map.Core.Utilities;
using Microsoft.Maps.MapControl;

#endregion

namespace DeepEarth.Map.BingMaps
{
    public class CustomTileSource : TileSource
    {
        private readonly QuadKeyTilePath pathHelper;

        public CustomTileSource(string uriFormat, string culture)
            : base(uriFormat)
        {
            pathHelper = new QuadKeyTilePath{Culture = culture, UriFormat = uriFormat};
        }

        public override Uri GetUri(int x, int y, int zoomLevel)
        {
            return new Uri(pathHelper.GetUri(zoomLevel,x,y));
        }
    }
}
